//
//  UIImageView+Extension.m
//  JiHe
//
//  Created by liuguochao on 16/4/25.
//  Copyright © 2016年 JiHe. All rights reserved.
//

#import "UIImageView+Extension.h"

@implementation UIImageView (Extension)

- (void)setCircleImageWithUrl:(NSString *)url{
    UIImage *placeholder = [[UIImage imageNamed:@""] circleImage];
    [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:placeholder completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.image = image ? [image circleImage] : placeholder;
    }];
}

//- (void)JH_setImageWithUrl:(NSString *)url  placeholderImage:(UIImage *)placeholder {
//    if (url) {
//        [self sd_setImageWithURL:[NSURL URLWithString:[NSString stringByAppendingString:url]] placeholderImage:placeholder];
//    }
//}
@end
